<?php

namespace app\admin\logic;



use app\admin\model\User;
use app\common\utils\Utils;
use think\Db;
use think\Exception;
use think\exception\ValidateException;

/**
 * 会员接口
 */
class PlanLogic
{
    protected $user;
    protected $plan;
    public function __construct($plan)
    {
        $this->user = new User();
        $this->plan = $plan;
    }

    /**
     * 获取参与考试的ids
     */
    public function getUserIds() {
        if ($this->plan['province']) {
            $w['province'] = $this->plan['province'];
        }
        if ($this->plan['city']) {
            $w['province'] = $this->plan['city'];
        }

        if ($this->plan['area']) {
            $w['province'] = $this->plan['area'];
        }

        $ids = $this->user->where($w)->column('id');

        return $ids;
    }

}
